home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: CONVERTING INTEGER TO ASCII??????
- Date: Sun, 17 Mar 96 19:17:29 GMT
- Organization: none
- Distribution: world
- Message-ID: <827090249snz@genesis.demon.co.uk>
- References: <4i17r9$2kn@maltese.eag.unisysgsg.com> <4i1cvg$1cg@solutions.solon.com> <4ic5kp$d0g@athos.cc.bellcore.com> <16MAR199609550235@erich.triumf.ca>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <16MAR199609550235@erich.triumf.ca>
- bennett@erich.triumf.ca "P.Bennett" writes:
-
- >In article <4ic5kp$d0g@athos.cc.bellcore.com>, "Sandeep V. Tamhankar"
- > <stamhank@notes.cc.bellcore.com> writes...
- >
- >>Another way to convert integer to ASCII is to add char '0' to your
- >>integer. Like so:
- >>
- >> int asc;
- >> asc= known_int + '0';
- >>
- >>This way, you don't have to load any function and there is no overhead.
- >
- >But this only works for 10 of the (at least) 65,536 possible integer values.
-
- Well, at least 65535.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-